<?php
/**
 * User: @lixu
 * Date: 2019-05-06
 * Time: 15:26
 * 初始化wiki之后清洗link回调
 */

namespace Biz\service\LinkCleaning;

use Doraemon\amqp\Queue as amqPQueue;
use Biz\pockets\callback\taskCallback;
use Doraemon\tools\Log;

class TaskCallbackInitWiki implements taskCallback
{
    public static function taskCallback($sign, $result)
    {
        Log::wiki_taskCallBack_info(json_encode(['sign' => $sign, 'result' => $result]));
        if ($result['code'] > 0) {
            call_user_func_array(
                'Biz\service\wiki\WikiClean::' . 'clean'
                , [
                $sign,
                $result
            ]);
        }

        return true;
    }
}